<aside class="right-aside">
	<ul>
		<li style="display: block" onmousemove="showMoreSns(this)" onmouseout="hideMoreSns(this)">
			<div class="aside-sns">
				<ul>
					<li>
						<div class="copy-link gd-popover" content="Copy Link" placement="right" onclick="copyLink()">
							<i class="iconfont iconLink"></i>
						</div>
					</li>
					<li>
						<div class="aside-tw gd-popover" onclick="toShare(1)" content="Twitter" placement="right">
							<i class="iconfont iconTwitter"></i>
						</div>
					</li>
					<li>
						<div class="aside-fb gd-popover" onclick="toShare(2)" content="Facebook" placement="right">
							<i class="iconfont iconicons8-facebook"></i>
						</div>
					</li>
					<li style="display: none;">
						<div onclick="toShare(3)">
							<img style="width: 40px;height: 40px;" src="${request.contextPath}/static/img/aside_ins.png" alt="ins">
						</div>
					</li>
				</ul>
			</div>
			<div class="aside-share">
				<i class="iconfont iconshare"></i>
			</div>
		</li>

		<li style="display: block">
			<a href="mailto: tk@gugeedata.com">
				<div class="aside-mail">
					<i class="iconfont iconMail"></i>
				</div>
			</a>
		</li>

		<li style="display: block">
			<#if isMobile == false>
				<a href="https://wpa.qq.com/msgrd?v=3&uin=2880446373&site=qq&menu=yes">
					<div class="aside-qq">
						<i class="iconfont iconQQ-16px"></i>
					</div>
				</a>
			<#else>
				<a href="mqqwpa://im/chat?chat_type=wpa&uin=2679571084&version=1&src_type=web&web_src=www.gugeedata.com">
					<div class="aside-qq">
						<i class="iconfont iconQQ-16px"></i>
					</div>
				</a>
			</#if>
		</li>


		<li style="display: none">
			<a href="#top">
				<div class="aside-top">
					<i class="iconfont iconbacktotop"></i>
				</div>
			</a>
		</li>
	</ul>
</aside>

<script src="${request.contextPath}/static/js/gd-ui/popover/index.js"></script>
<script src="${request.contextPath}/static/js/scroll.js"></script>
<script>
	// 滚动显示“置顶”按钮
	const rightAside2 = document.querySelectorAll('.right-aside > ul > li')[3]
	window.addEventListener('scroll', () => {
        if(getScroll().top > (screen.height / 2)) {
            rightAside2.show()
        } else {
            rightAside2.hide()
        }
    })
	function toShare(inx) {
	    if(inx === 1) {
            shareWindow('http://twitter.com/share?url=' + encodeURIComponent(window.location.href) + '&text=' + encodeURIComponent(document.title))
	    } else if(inx === 2) {
            shareWindow('http://www.facebook.com/sharer/sharer.php?u' + encodeURIComponent(window.location.href))
	    }
	}
	function shareWindow (url) {
		window.open(url, '', 'left=0,top=0,width=550,height=450,personalbar=0,toolbar=0,scrollbars=0,resizable=0' )
	}
	function hideMoreSns(e) {
        e.querySelector('.aside-sns').hide()
	}
	function showMoreSns(e) {
        e.querySelector('.aside-sns').show()
	}
	function copyLink() {
	    let e = document.createElement('input')
        document.body.appendChild(e)
		e.setAttribute('value', window.location.href)
		e.select()
        if(document.execCommand('copy')){
            document.execCommand('copy')
            showToast('copy success')
        }
        document.body.removeChild(e)
	}
	function toTop () {
	    document.body.scrollTop = 0
	}
</script>
